<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // 1.基本使用
    let sym = Symbol();
    console.log(sym)  // Symbol()
    console.log(typeof sym)  // symbol
    console.log('------')

    // 2.对符号描述
    let s1 = Symbol()
    let s2 = Symbol()

    let s3 = Symbol('foo')
    let s4 = Symbol('foo')
    console.log(s1 == s2)// false
    console.log(s3 == s4) // false
    console.log('------')

    // 3.不可以使用new Symbol()
    // let s5 = new Symbol()

</script>
</body>
</html>